package com.ycu.epidemic.service;

import com.ycu.epidemic.bean.ProvinceInfo;
import com.ycu.epidemic.mapper.ProvinceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProvinceServiceImp implements ProvinceService{

    @Autowired
    private ProvinceMapper provinceMapper;

    @Override
    public List<ProvinceInfo> findNoDataProvince(String date) {
        /**
        *查询还没录入数据的省份
         * @Param date
        * @Author:lijinhua
        * @Date:2020/7/12
        */
        List<ProvinceInfo> list = null;
        short year =0,month=0,day=0;
        String [] arr = date.split("-");
        if (arr.length >=3){
            year = Short.parseShort(arr[0]);
            month = Short.parseShort(arr[1]);
            day = Short.parseShort(arr[2]);
            list = provinceMapper.findNoDataProvince(year,month,day);
        }
        return list;
    }
}
